package com.uyayo.oms.common.controller;

import com.uyayo.oms.system.biz.ParamBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.ServletException;
import java.io.IOException;


/**
 * 
 * Title: HomeController
 * Description:主页的Controller
 * Company: www.lelekeji.com
 *
 * @author 乐乐科技.胡逢君
 * @date 2016-4-23下午4:03:35
 * @version 1.0
 */
@Controller
@RequestMapping("/oms")
public class OmsController {

	private final ParamBiz paramBiz;

	@Autowired
	public OmsController(ParamBiz paramBiz) {
		this.paramBiz = paramBiz;
	}

	/**
	 * 管理员首页跳转
	 * @throws IOException 
	 * @throws ServletException 
	 */
	@RequestMapping(value={"index.html","/","home.html"},method=RequestMethod.GET)
	public ModelAndView index(ModelAndView modelAndView) throws IOException, ServletException {
		modelAndView.setViewName(paramBiz.getManagerTemplatesPrefix()+"index");
		return modelAndView;
	}
	
}
